public class User {
    public int account;
    private String password;
    public String mailbox;

    public User(int account,String password){
        this.account = account;
        this.password = password;
        ShowInfo();
    }
    public User(int account,String password,String mailbox){
        this.account = account;
        this.password = password;
        this.mailbox = mailbox;
        ShowInfo();
    }

    public void ShowInfo(){
        String Info = "账号是" + (account) + "，密码是" + password;
        if(mailbox != null){
            Info += "，邮箱是" + mailbox;
        }
        System.out.println(Info);
    }

    public static void main(String[] args) {
        User use1 = new User(644949,"ciogv59598449");
        User use2 = new User(654519,"vhfgfh549468","3397925799@qq.com");
    }
}
